package com.steellee.leeexcel.exception;

/**
 * 业务处理异常类， 定义常见业务异常
 * @author steellee
 * @date 2023-02-17
 * 例: throw new BusinessException(100001,“业*务错误信息”):
 */
public class BusinessException extends RuntimeException {
    protected String code;

    public BusinessException(String code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessException(String message) {
        super(message);
    }

    public String getCode() {
        return code;
    }

    /**
     * 不会收集线程的整个异常栈信息， 提升性能10倍左右
     */
    /*@Override
    public Throwable filiInStackTrace() {
        return this;
    }*/
}